package com.test.rest.client;

import org.apache.cxf.jaxrs.client.WebClient;

import com.test.rest.bean.Category;


public class Client2 {

	public static void main(String[] args) {
		
		WebClient client = WebClient.create("http://localhost:8080/cxf_rest_spring");
		
		client.path("/categoryservice/category").accept("application/xml").type("application/xml");
		
		Category category = new Category();
		category.setCategoryId("005");
		category.setCategoryName("helloworld");
		
		Category response = client.post(category, Category.class);
		System.out.println(response.getCategoryId());
		
	}
	
}
